<?php
require 'config.php';
include 'model/WeddingXML.class.php';

// setup some global variables
$x = new WeddingXML;
$c = new Config;
$requestURI = explode('/', $_SERVER['REQUEST_URI']);
// take off any empties
foreach($requestURI as $k=>$v) {
	if($v =="" || $v == 'wedding') { // @TODO remove wedding as this folder will not be there in live
		unset($requestURI[$k]);
	}
}
$requestURI = array_values($requestURI);
/** 
 * We now have a workable routing system
 */

if((!isset($requestURI[0]) || $requestURI[0] == 'login') && !isset($_SESSION['lcode'])) {
	require 'common/login.php';
	exit;
} else {
	require 'common/home.php';
	exit;
}
if(isset($requestURI[0])) {
	switch($requestURI[0]) {
		
	}
}